package com.glq1218.permission.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glq1218.domain.Menu;
import com.glq1218.domain.RolePermission;
import com.glq1218.permission.entity.Permission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @author glq1218
 * @description TODO
 * @since 2023/4/18 15:06
 */
@Repository
public interface PermissionMapper extends BaseMapper<Permission> {

    List<RolePermission> queryPermissionListByRoleId(Long roleId);

    List<Long> queryPidListByIds(@Param("permissionList") List<Long> permissionList);

    List<Menu> queryTopMenuListByUserId(Long userId);

    List<Menu> querySubMenuListByUserId(Long userId);

    List<Menu> queryTopMenuList();

    List<Menu> querySubMenuList();

    Set<String> queryPermissionByUserId(Long userId);
}
